from socket import *
import threading
sk = socket(AF_INET, type=SOCK_DGRAM)
sk.bind(('', 8080))
ip_port = (('192.168.14.237', 8888))
# sk.sendto(b'hello', ip_port)
while 1:
    msg, addr = sk.recvfrom(1024)
    print(msg.decode('utf - 8'))
    smsg = input('>>>').encode('utf - 8')
    sk.sendto(smsg, ip_port)
    if msg.decode('utf-8') == 'bye':
        sk.close()
